package com.st.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.st.domain.StStudyRecords;
import com.st.mapper.StStudyRecordsMapper;
import com.st.service.IStStudyRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 已购买产品学习记录Service业务层处理
 *
 * @author zhw
 * @date 2024-10-24
 */
@Service
public class StStudyRecordsServiceImpl extends ServiceImpl<StStudyRecordsMapper, StStudyRecords> implements IStStudyRecordsService {
    @Autowired
    private StStudyRecordsMapper stStudyRecordsMapper;

    /**
     * 查询已购买产品学习记录
     *
     * @param id 已购买产品学习记录主键
     * @return 已购买产品学习记录
     */
    @Override
    public StStudyRecords selectStStudyRecordsById(Integer id) {
        return stStudyRecordsMapper.selectStStudyRecordsById(id);
    }

    /**
     * 查询已购买产品学习记录列表
     *
     * @param stStudyRecords 已购买产品学习记录
     * @return 已购买产品学习记录
     */
    @Override
    public List<StStudyRecords> selectStStudyRecordsList(StStudyRecords stStudyRecords) {
        return stStudyRecordsMapper.selectStStudyRecordsList(stStudyRecords);
    }

    /**
     * 新增已购买产品学习记录
     *
     * @param stStudyRecords 已购买产品学习记录
     * @return 结果
     */
    @Override
    public int insertStStudyRecords(StStudyRecords stStudyRecords) {
            return stStudyRecordsMapper.insertStStudyRecords(stStudyRecords);
    }

    /**
     * 修改已购买产品学习记录
     *
     * @param stStudyRecords 已购买产品学习记录
     * @return 结果
     */
    @Override
    public int updateStStudyRecords(StStudyRecords stStudyRecords) {
        return stStudyRecordsMapper.updateStStudyRecords(stStudyRecords);
    }

    /**
     * 批量删除已购买产品学习记录
     *
     * @param ids 需要删除的已购买产品学习记录主键
     * @return 结果
     */
    @Override
    public int deleteStStudyRecordsByIds(Integer[] ids) {
        return stStudyRecordsMapper.deleteStStudyRecordsByIds(ids);
    }

    /**
     * 删除已购买产品学习记录信息
     *
     * @param id 已购买产品学习记录主键
     * @return 结果
     */
    @Override
    public int deleteStStudyRecordsById(Integer id) {
        return stStudyRecordsMapper.deleteStStudyRecordsById(id);
    }

    @Override
    public int updateStStudyRecords1(StStudyRecords studyRecords) {
        return stStudyRecordsMapper.updateStStudyRecords1(studyRecords);
    }
}